package pc29;

import java.util.Scanner;

public class J01Account {

	public static void main(String[] args) {
		/*
		 // 1. 변수 선언 및 초기화
		 int aid = 0;
		 int balance = 0;
		 double interestRate = 0;
		 string dateCreated; // 2014-03-11
		 double getMonthlyinterstRate;
		 int withDraw;
		 int deposit;
		 // 2. 계산 및 연산
		 interestRate=
		 getMonthlyInterstRate=
		 balance = balance + deposit;
		 balance = lalance - withDraw;
		 // 변수 초기화없이 수식을 사용하면 오류발생!!
		 */

		int aid = 0;
		int balance = 20000;
		int dateCreated = 20140310;
		int withdraw;
		int deposit;
		double interestRate;
		double getMonthlyInterestRate;

		Scanner a = new Scanner(System.in);

		System.out.println("계좌번호 입력 :");
		aid = a.nextInt();
		System.out.println("통장개설날짜는 : " + dateCreated);
		System.out.println("잔액 : " + balance);
		System.out.println("월간 이자율을 입력 : ");
		getMonthlyInterestRate = a.nextDouble();

		getMonthlyInterestRate = getMonthlyInterestRate / 12;

		System.out.println("연간이자율은 : " + getMonthlyInterestRate);

		System.out.println("얼마 인출하시겠습니까 :");
		withdraw = a.nextInt();
		balance = balance - withdraw;

		System.out.println("얼마 예금하시겠습니까 :");
		deposit = a.nextInt();
		balance = balance + deposit;

		System.out.println("잔액은 : " + balance);
	}

}
